package cn.iocoder.yudao.module.project.service.kismaterielexwarehouse;

import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.module.project.controller.admin.kismaterielexwarehouse.vo.*;
import cn.iocoder.yudao.module.project.controller.admin.order.vo.PreparationVO;
import cn.iocoder.yudao.module.project.dal.dataobject.kismaterielexwarehouse.KisMaterielExWarehouseDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;

/**
 * 物料出库单 Service 接口
 *
 * @author 芋道源码
 */
public interface KisMaterielExWarehouseService {

    /**
     * 创建物料出库单
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    String createKisMaterielExWarehouse(@Valid KisMaterielExWarehouseSaveReqVO createReqVO);

    /**
     * 更新物料出库单
     *
     * @param updateReqVO 更新信息
     */
    void updateKisMaterielExWarehouse(@Valid KisMaterielExWarehouseSaveReqVO updateReqVO);

    /**
     * 删除物料出库单
     *
     * @param id 编号
     */
    void deleteKisMaterielExWarehouse(String id);

    /**
     * 获得物料出库单
     *
     * @param id 编号
     * @return 物料出库单
     */
    KisMaterielExWarehouseDO getKisMaterielExWarehouse(String id);

    /**
     * 获得物料出库单分页
     *
     * @param pageReqVO 分页查询
     * @return 物料出库单分页
     */
    PageResult<KisMaterielExWarehouseDO> getKisMaterielExWarehousePage(KisMaterielExWarehousePageReqVO pageReqVO);




    /**
     * 查询已经存在的物料单数据
     * @param params
     * @return
     */
    List<KisMaterielExWarehouseDO> selectSavedList(Map<String, Object> params);

    void insertRecord(List<KisMaterielExWarehouseDO> insertList);

    void updateRecord(List<KisMaterielExWarehouseDO> updateList);

    String bondCartonCode(KisMaterielExWarehouseSaveReqVO createReqVO);
    String bondMultiCartonCode(KisMaterielExWarehouseSaveReqVO createReqVO);
    String materiaPick(KisMaterielExWarehouseSaveReqVO createReqVO);

    /**
     * 根据cartonCodes查询物料出库情况
     * @param params
     * @return
     */
    List<KisMaterielExWarehouseDO> selectMaterialByCartonCodes(Map<String, Object> params);

    Long countMaterialExWarehouseList(Map<String, Object> params);

    List<KisMaterialExWarehouseListVO> selectMaterialExWarehouseList(Map<String, Object> params);

    PageResult<KisMaterielExWarehouseDO> detailByExCode(KisMaterielExWarehousePageReqVO pageReqVO);

    List<CartonCodeDetailNumVO> queryMultiCartonCode(KisMaterielExWarehouseSaveReqVO createReqVO);

    List<CartonCodeDetailNumVO> updateMultiCartonCode(List<CartonCodeDetailNumVO> reqVO);

    Integer selectUncheckMaterialByOrderCode(Map<String, Object> params);

    List<KisMaterielExWarehouseDO> selectTypeByOrderCode(Map<String, Object> params);

    List<KisMaterielExWarehouseDO> selectLastExCodeByOrderCode(Map<String, Object> params);

    List<KisMaterialExWarehouseListVO> selectExCodeByOrderCode(Map<String, Object> params);

    Long countExCodeByOrderCode(Map<String, Object> params);

    Boolean submitProductCollect(List<MaterialProductCollectVO> createReqVOList);

    String bindBoxCodeEdit(KisMaterielExWarehouseSaveReqVO createReqVO);

    List<CartonCodeDetailNumVO> bindBoxCodeNumUpdate(List<CartonCodeDetailNumVO> reqVO);

    void createInternalCodeByOrderCode(PreparationVO reqVO);
}